package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DoctorinfoMapper;
import com.ruoyi.system.domain.Doctorinfo;
import com.ruoyi.system.service.IDoctorinfoService;

/**
 * 医生档案Service业务层处理
 * 
 * @author gzhuangwei
 * @date 2022-09-23
 */
@Service
public class DoctorinfoServiceImpl implements IDoctorinfoService 
{
    @Autowired
    private DoctorinfoMapper doctorinfoMapper;

    /**
     * 查询医生档案
     * 
     * @param id 医生档案主键
     * @return 医生档案
     */
    @Override
    public Doctorinfo selectDoctorinfoById(Long id)
    {
        return doctorinfoMapper.selectDoctorinfoById(id);
    }

    /**
     * 查询医生档案列表
     * 
     * @param doctorinfo 医生档案
     * @return 医生档案
     */
    @Override
    public List<Doctorinfo> selectDoctorinfoList(Doctorinfo doctorinfo)
    {
        return doctorinfoMapper.selectDoctorinfoList(doctorinfo);
    }

    /**
     * 新增医生档案
     * 
     * @param doctorinfo 医生档案
     * @return 结果
     */
    @Override
    public int insertDoctorinfo(Doctorinfo doctorinfo)
    {
        return doctorinfoMapper.insertDoctorinfo(doctorinfo);
    }

    /**
     * 修改医生档案
     * 
     * @param doctorinfo 医生档案
     * @return 结果
     */
    @Override
    public int updateDoctorinfo(Doctorinfo doctorinfo)
    {
        return doctorinfoMapper.updateDoctorinfo(doctorinfo);
    }

    /**
     * 批量删除医生档案
     * 
     * @param ids 需要删除的医生档案主键
     * @return 结果
     */
    @Override
    public int deleteDoctorinfoByIds(Long[] ids)
    {
        return doctorinfoMapper.deleteDoctorinfoByIds(ids);
    }

    /**
     * 删除医生档案信息
     * 
     * @param id 医生档案主键
     * @return 结果
     */
    @Override
    public int deleteDoctorinfoById(Long id)
    {
        return doctorinfoMapper.deleteDoctorinfoById(id);
    }

    @Override
    public Doctorinfo selectByDoctorId(String doctorId) {
        return doctorinfoMapper.selectByDoctorId(doctorId);
    }

}
